package com.cy.device.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author: jiangwang
 * @created: 2023/10/31 14:50
 */
@Component
public class StartRunner implements CommandLineRunner {

    private final Logger logger = LoggerFactory.getLogger(StartRunner.class);

    @Autowired
    private DeviceService deviceService;

    @Override
    public void run(String... args) throws Exception {
        deviceService.getDeviceInfo();
        logger.info("服务启动成功...");
    }

}
